import os
path="/local/climate_2012/lauren-working/outputs/Australia-5km/"
dirList=os.listdir(path)
scenarios=[]
gcms=[]

for file in dirList:
    if file.startswith("JCU"):
        fname=file.split('-')
        scenarios.append(fname[4])
        gcms.append(fname[5] + '-' + fname[6])

scenarios = list(set(scenarios))
gcms = list(set(gcms))
  
scenarios.remove('all')
gcms.remove('all-all.zip')   


for scenario in scenarios:
    for gcm in gcms:
        wd = "/local/climate_2012/lauren-working/outputs/Australia-5km/" + scenario + ' ' + gcm
        
  


  
  

metadata = open(path + 'test.txt','w')
metadata.write(scenarios[1] + " Hello world")
metadata.close()

